import {AuthOptions,getServerSession as nextAuthGetServerSession} from "next-auth"
// import CredentialsProvider from "next-auth/providers/credentials"
import GitlabProvider from "next-auth/providers/gitlab";
import {DrizzleAdapter} from "@auth/drizzle-adapter";
import {db} from "@/server/db/db"
export const authOptions = {
    adapter:DrizzleAdapter(db),
    // Configure one or more authentication providers
    providers: [
        GitlabProvider({
            clientId: "b0a1abfa6067ed42f4c5678eacabb127e27a2eabd0784f4543cfc40e1d08e9dd",
            clientSecret: "gloas-35c66107973068bc605deac52182fc880a7203fb598f07c30ce686836dde47d3"
        })    ],
}
//服务端获取session
export function getServerSession(){
    return nextAuthGetServerSession (authOptions)
}